//package com.bridgeintelligent.tag.engine.mvc.index;
//
//import com.bridgeintelligent.tag.constants.indexquery.IndexDistributionModel;
//import com.bridgeintelligent.tag.constants.indexquery.IndexDistributionRsp;
//import com.bridgeintelligent.tag.engine.api.Filter;
//import com.bridgeintelligent.tag.engine.core.cache.CacheConfig;
//import com.bridgeintelligent.tag.engine.core.cache.CacheUtils;
//import com.bridgeintelligent.tag.engine.es.query.EsQueryBuilder;
//import com.bridgeintelligent.tag.engine.es.query.condition.DateBuilder;
//import org.apache.commons.collections.CollectionUtils;
//import org.springframework.stereotype.Service;
//
///**
// * @author JackCheung
// * @date 2020/7/2 6:10 PM.
// * description:
// */
//@Service
//public class IndexQueryServiceImpl implements IIndexQueryService {
//
//    /**
//     * 标签人数分布查询
//     * 如果标签项集合为空，则说明用户使用了自定义区间
//     *
//     * @param model IndexDistributionModel
//     * @return IndexDistributionRsp
//     */
//    @Override
//    public IndexDistributionRsp distribution(IndexDistributionModel model) {
//        Filter filter;
//        if (CollectionUtils.isNotEmpty(model.getItemIds())) {
//            filter = fetchFilter(model);
//            EsQueryBuilder.buildSimpleFilter(filter);
//        } else {
////            filter =
//        } return null;
//    }
//
//    private Filter fetchFilter(IndexDistributionModel model) {
//        Filter filter = new Filter();
//        filter.setDimId(model.getDimId());
//        filter.setValueList(model.getItemIds());
//        filter.setType(DateBuilder.ZERO);
//        filter.setTimeType(true);
//        return filter;
//    }
//}
